﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="EmpLeave.aspx.cs" Inherits="Employees_EmpLeave" %>
<%@ Register Src="../Control/SelUser.ascx" TagName="SelUser" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" Runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        datamember="EmpLeave" onadding="Master_Adding" 
        onupdating="Master_Updating">
    </infolight:webdatasource>
    <fieldset title="员工离职" style="overflow: hidden">
        <legend style="font-size: large; font-weight: bold">员工离职记录</legend>
        <table style="width: 100%">
            <tr>
                <td>
                    <infolight:webnavigator id="wn" runat="server" bindingobject="EmpLeave" oncommand="wnHr_Command"
                        showdatastyle="FormViewStyle" width="100%" statusstrip="WebStatusStrip1" 
                        anyqueryid="wn" CssClass="NavigatorBar" CtlHeight="25">
                        <navcontrols>
                <InfoLight:ControlItem ControlName="First" ControlText="掸" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/first.gif" MouseOverImageUrl="../image/uipics/first2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/first3.gif" />
                <InfoLight:ControlItem ControlName="Previous" ControlText="掸" ControlType="Image"
                    ControlVisible="False" ImageUrl="../image/uipics/previous.gif" MouseOverImageUrl="../image/uipics/previous2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/previous3.gif" />
                <InfoLight:ControlItem ControlName="Next" ControlText="掸" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/next.gif" MouseOverImageUrl="../image/uipics/next2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/next3.gif" />
                <InfoLight:ControlItem ControlName="Last" ControlText="ソ掸" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/last.gif" MouseOverImageUrl="../image/uipics/last2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/next3.gif" />
                    
                    
                    
<InfoLight:ControlItem ControlName="Add" ControlText="add" ControlType="Image" ControlVisible="True"
                    DisenableImageUrl="../Image/UIPics/Add3_C.gif" ImageUrl="../Image/UIPics/Add_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Add2_C.gif" Size="48">
                </InfoLight:ControlItem>
                 <InfoLight:ControlItem ControlName="Update" ControlText="update" ControlType="Image"
                    ControlVisible="True" DisenableImageUrl="../Image/UIPics/Edit3_C.gif" ImageUrl="../Image/UIPics/Edit_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Edit2_C.gif" Size="48">
                </InfoLight:ControlItem>
               
                <InfoLight:ControlItem ControlName="Delete" ControlText="埃" ControlType="Image"
                    ControlVisible="False" ImageUrl="../image/uipics/delete_C.gif" MouseOverImageUrl="../image/uipics/delete2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/delete3_C.gif" />
                <InfoLight:ControlItem ControlName="OK" ControlText="絋粄" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/ok.gif" MouseOverImageUrl="../image/uipics/ok2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/ok3.gif" />

                    
                    
               
<InfoLight:ControlItem ControlName="Cancel" ControlType="Image" ControlVisible="True"
                    DisenableImageUrl="../Image/UIPics/Abort3_C.gif" ImageUrl="../Image/UIPics/Abort_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Abort2_C.gif" Size="48">
                </InfoLight:ControlItem>
<InfoLight:ControlItem ControlName="Apply" ControlType="Image" ControlVisible="True"
                    DisenableImageUrl="../Image/UIPics/Apply3_C.gif" ImageUrl="../Image/UIPics/Apply_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Apply2_C.gif" Size="48">
                </InfoLight:ControlItem>
                    
                    
                    
                <InfoLight:ControlItem ControlName="Abort" ControlText="斌" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/abort.gif" MouseOverImageUrl="../image/uipics/abort2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/abort3.gif" />
                <InfoLight:ControlItem ControlName="Query" ControlText="琩高" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/query.gif" MouseOverImageUrl="../image/uipics/query2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/query3.gif" />
                <InfoLight:ControlItem ControlName="Print" ControlText="ゴ" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/print.gif" MouseOverImageUrl="../image/uipics/print2.gif"
                    Size="25" DisenableImageUrl="../image/uipics/print3.gif" />
                <InfoLight:ControlItem ControlName="Export" ControlType="Image" ControlVisible="False"
                    DisenableImageUrl="../Image/UIPics/Export3.gif" ImageUrl="../Image/UIPics/Export.gif"
                    MouseOverImageUrl="../Image/UIPics/Export2.gif" Size="25" />
            </navcontrols>
                        <navstates>
                <InfoLight:WebNavigatorStateItem StateText="Initial" />
                <InfoLight:WebNavigatorStateItem StateText="Browsed" />
                <InfoLight:WebNavigatorStateItem StateText="Inserting" />
                <InfoLight:WebNavigatorStateItem StateText="Editing" />
                <InfoLight:WebNavigatorStateItem StateText="Applying" />
                <InfoLight:WebNavigatorStateItem StateText="Changing" />
                <InfoLight:WebNavigatorStateItem StateText="Querying" />
                <InfoLight:WebNavigatorStateItem StateText="Printing" />
            </navstates>
                    </infolight:webnavigator>
                    <infolight:webformview id="EmpLeave" runat="server" datasourceid="Master" width="100%"
                        cellpadding="4" ondatabound="EmpLeave_DataBound">
                        <edititemtemplate>
                      <table class="tbE" cellpadding="5">
         <tr>
             <td class="label1">
                离职编号：
             </td>
             <td class="readonly">
                 <asp:TextBox ID="TextBox1" runat="server" ReadOnly="true" Text='<%# Bind("EmpLeaveId") %>'></asp:TextBox>
             </td>
             <td class="label2">
                 离职员工(<span style="color:Red">*</span>)：
             </td>
             <td class="textbox">
              <uc1:SelUser ID="SelUser" runat="server" />
                 
             </td>
         </tr>
         
          <tr>
             <td class="label1">
                离职类型(<span style="color:Red">*</span>)：
             </td>
             <td class="textbox">
               <InfoLight:WebDropDownList ID="EmpRecordClass" runat="server" 
                                        AutoInsertEmptyData="False" DataSourceID="wdsLeaveType" DataTextField="ValueName" 
                                        DataValueField="ValueId" DriverObject="" Filter="" FilterObject="" 
                                        onlyshowselecttext="False" 
                     SelectedValue='<%# Bind("LeaveType") %>'>
                                    </InfoLight:WebDropDownList>
             </td>
             <td class="label2">
                 离职时间(<span style="color:Red">*</span>)：
             </td>
             <td class="textbox">
                <asp:TextBox ID="TextBox2" runat="server" 
                     onfocus="WdatePicker({dateFmt:'yyyy-M-d'})" 
                     Text='<%# Bind("LeaveTime", "{0:d}") %>' CssClass="Wdate"/></asp:TextBox>

             </td>
         </tr>
         <tr>
             <td class="label1">
                离职原因(<span style="color:Red">*</span>)：
             </td>
                <td colspan="3" style="width:30%" >
            
                 
                  <asp:CheckBoxList ID="LeaveReason" runat="server" 
                     DataSourceID="wdsLeaveReason" DataTextField="ValueName" 
                     DataValueField="ValueId" RepeatColumns="4" RepeatDirection="Horizontal" 
                     RepeatLayout="Table" CellPadding="5" CellSpacing="0" Width="100%">
                 </asp:CheckBoxList>
                 <asp:HiddenField ID="HidLeaveReason" runat="server"  Value='<%# Bind("LeaveReason") %>'/>
             </td>
         </tr>
         <tr>
             <td class="label1">
                其他原因：
             </td>
             <td class="textbox" colspan="3">
                 <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("OtherReason") %>' TextMode="MultiLine"></asp:TextBox>
             </td>
         </tr>
         </table>
            </edititemtemplate>
                        <insertitemtemplate>
             <table class="tbI" cellpadding="5">
         <tr>
             <td class="label1">
                离职编号：
             </td>
             <td class="readonly">
                 <asp:TextBox ID="EmpLeaveId" runat="server" ReadOnly="true" Text='<%# Bind("EmpLeaveId") %>'></asp:TextBox>
             </td>
             <td class="label2">
                 离职员工(<span style="color:Red">*</span>)：
             </td>
             <td class="textbox">
              <uc1:SelUser ID="SelUser" runat="server" />
                 
             </td>
         </tr>
         
          <tr>
             <td class="label1">
                离职类型(<span style="color:Red">*</span>)：
             </td>
             <td class="textbox">
               <InfoLight:WebDropDownList ID="EmpRecordClass" runat="server" 
                                        AutoInsertEmptyData="False" DataSourceID="wdsLeaveType" DataTextField="ValueName" 
                                        DataValueField="ValueId" DriverObject="" Filter="" FilterObject="" 
                                        onlyshowselecttext="False" 
                     SelectedValue='<%# Bind("LeaveType") %>'>
                                    </InfoLight:WebDropDownList>
             </td>
             <td class="label2">
                 离职时间(<span style="color:Red">*</span>)：
             </td>
             <td class="textbox">
                <asp:TextBox ID="EmpRecordDate" runat="server" 
                     onfocus="WdatePicker({dateFmt:'yyyy-M-d'})" 
                     Text='<%# Bind("LeaveTime", "{0:d}") %>' CssClass="Wdate"/></asp:TextBox>
             </td>
         </tr>
         <tr>
             <td class="label1">
                离职原因(<span style="color:Red">*</span>)：
             </td>
             <td colspan="3" style="width:30%" >
                 <asp:CheckBoxList ID="LeaveReason" runat="server" 
                     DataSourceID="wdsLeaveReason" DataTextField="ValueName" 
                     DataValueField="ValueId" RepeatColumns="4" RepeatDirection="Horizontal" 
                     RepeatLayout="Table" CellPadding="5" CellSpacing="0" Width="100%">
                 </asp:CheckBoxList>
                 <asp:HiddenField ID="HidLeaveReason" runat="server" Value='<%# Bind("LeaveReason") %>'/>
             </td>
         </tr>
         <tr>
             <td class="label1">
                其他原因：
             </td>
             <td class="textbox" colspan="3">
                 <asp:TextBox ID="OtherReason" runat="server" Text='<%# Bind("OtherReason") %>' TextMode="MultiLine"></asp:TextBox>
             </td>
         </tr>
         </table>
            </insertitemtemplate>
                        <itemtemplate>
                   <table class="tbR" cellpadding="5">
         <tr>
             <td class="label1">
                离职编号：
             </td>
             <td class="readonly">
                 <asp:TextBox ID="TextBox4" runat="server" ReadOnly="true" Text='<%# Bind("EmpLeaveId") %>'></asp:TextBox>
             </td>
             <td class="label2">
                 离职员工(<span style="color:Red">*</span>)：
             </td>
             <td class="textbox">
              <uc1:SelUser ID="SelUser" runat="server" />
                 
             </td>
         </tr>
         
          <tr>
             <td class="label1">
                离职类型(<span style="color:Red">*</span>)：
             </td>
             <td class="textbox">
               <InfoLight:WebDropDownList ID="EmpRecordClass" runat="server" 
                                        AutoInsertEmptyData="False" DataSourceID="wdsLeaveType" DataTextField="ValueName" 
                                        DataValueField="ValueId" DriverObject="" Filter="" FilterObject="" 
                                        onlyshowselecttext="True" 
                     SelectedValue='<%# Bind("LeaveType") %>'>
                                    </InfoLight:WebDropDownList>
             </td>
             <td class="label2">
                 离职时间(<span style="color:Red">*</span>)：
             </td>
             <td class="textbox">
                <asp:TextBox ID="TextBox5" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-M-d'})" Text='<%# Bind("LeaveTime", "{0:d}") %>'/></asp:TextBox>

             </td>
         </tr>
         <tr>
             <td class="label1">
                离职原因(<span style="color:Red">*</span>)：
             </td>
                <td colspan="3" style="width:30%" >
               
                 
                   <asp:CheckBoxList ID="LeaveReason" runat="server" 
                     DataSourceID="wdsLeaveReason" DataTextField="ValueName" 
                     DataValueField="ValueId" RepeatColumns="4" RepeatDirection="Horizontal" 
                     RepeatLayout="Table" CellPadding="5" CellSpacing="0" Width="100%" 
                        Enabled="False">
                 </asp:CheckBoxList>
                  <asp:HiddenField ID="HidLeaveReason" runat="server"  Value='<%# Bind("LeaveReason") %>'/>
             </td>
         </tr>
         <tr>
             <td class="label1">
                其他原因：
             </td>
             <td class="textbox" colspan="3">
                 <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("OtherReason") %>' TextMode="MultiLine"></asp:TextBox>
             </td>
         </tr>
         </table>
            </itemtemplate>
                        <fields>
                <InfoLight:FormViewField ControlID="EmpLeaveId" 
                    FieldName="EmpLeaveId" />
                <InfoLight:FormViewField ControlID="EmployeeId" 
                    FieldName="EmployeeId" />
                <InfoLight:FormViewField ControlID="LeaveType" FieldName="LeaveType" />

               
 <InfoLight:FormViewField ControlID="OtherReason" 
                    FieldName="OtherReason" />
            
 <InfoLight:FormViewField ControlID="HidLeaveReason" 
                    FieldName="LeaveReason" />
            </fields>
                    </infolight:webformview>
                </td>
            </tr>
        </table>
    </fieldset>
    <infolight:webvalidate id="wvEmpLeave" runat="server" datasourceid="Master" 
        datamember="EmpLeave" rowcss="" altrowcss="" ForeColor="Red" 
        ValidateStyle="ShowDialog">
        <Fields>
            <InfoLight:ValidateFieldItem CheckNull="True" FieldName="LeaveTime"></InfoLight:ValidateFieldItem>
        </Fields>
    </infolight:webvalidate>
    <infolight:webdatasource runat="server" id="wdsLeaveType" selectalias="Usasdb" selectcommand="select Employees_LinkValue.ValueId,Employees_LinkValue.ValueName,Employees_LinkValue.TypeId,Employees_LinkValue.ValueStatus from Employees_LinkValue
where TypeId='LeaveType'">
    </infolight:webdatasource>
    <infolight:webdatasource runat="server" id="wdsLeaveReason" selectalias="Usasdb"
        selectcommand="select Employees_LinkValue.ValueId,Employees_LinkValue.ValueName,Employees_LinkValue.TypeId,Employees_LinkValue.ValueStatus from Employees_LinkValue
where TypeId='LeaveReason' order by Employees_LinkValue.ValueId">
    </infolight:webdatasource>
    <InfoLight:WebDefault ID="wdEmpLeave" runat="server" DataSourceID="Master">
        <Fields>
          
            <InfoLight:DefaultFieldItem DefaultValue="0" FieldName="EmpLeaveId"></InfoLight:DefaultFieldItem>
        </Fields>
    </InfoLight:WebDefault>
    <br />
   
    <div style="text-align:center">

 <span class="roundbtn" runat="server" id="RedBack">
                    <asp:LinkButton ID="LinkButton1" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;返&nbsp;&nbsp;回&nbsp;&nbsp;&nbsp;&nbsp;"
                         OnClientClick="location.href='EmpLeaveList.aspx';return false"></asp:LinkButton>
                </span>
</div>
     <asp:HiddenField ID="hidEid" runat="server" />
    <asp:HiddenField ID="hidEname" runat="server" />
     <asp:HiddenField ID="hidReason" runat="server" />
</asp:Content>

